﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace MvcSecCamStore.Models
{
	[Bind(Exclude = "CamId")]
	public class Cam
	{
		[ScaffoldColumn(false)]
		public int CamId { get; set; }

		[DisplayName("Camtype")]
		public int CamtypeId { get; set; }

		[DisplayName("Manufact")]
		public int ManufactId { get; set; }

		[Required(ErrorMessage = "A Cam Title is required")]
		[StringLength(160)]
		public string Title { get; set; }

		[Required(ErrorMessage = "Price is required")]
		[Range(0.01, 1000.00,
		ErrorMessage = "Price must be between 0.01 and 1000.00")]
		public decimal Price { get; set; }

        [DisplayName("Cam Manufact URL")]
        [StringLength(1024)]
        public string CamManufactUrl { get; set; }
        
        public virtual Camtype Camtype { get; set; }
        public virtual Manufact Manufact { get; set; }
        public virtual List<OrderDetail> OrderDetails { get; set; }
    }
}